<%@ page contentType="text/html; charset=UTF-8"%>
 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> 
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@taglib prefix="h" uri="/syzg-html"%>

<!DOCTYPE html>
<html>
	<head>
		<%@ include file="/base/jsp/common/CommonListTop.jsp"%>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<title>系统管理-角色管理</title>
		<link href="${ctx}/base/css/common.css" rel="stylesheet" type="text/css" />
		<link href="${ctx}/base/css/${customTheme}.css" rel="stylesheet" type="text/css" />
		<script src="${ctx}/base/js/base.js" type="text/javascript"></script>
		<script src="${ctx}/base/js/common/FormFunction.js" type="text/javascript"></script>
		<script src="${ctx}/baseNew/plugins/jQuery/jQuery-2.2.0.min.js"></script>
		<link href="${ctx}/baseNew/bootstrap/css/bootstrap.min.css" rel="stylesheet">
		<script src="${ctx}/baseNew/bootstrap/js/bootstrap.js" type="text/javascript"></script>
    	<link href="${ctx}/baseNew/other/css/bootstrap-datetimepicker.min.css" rel="stylesheet" media="screen">
		<script src="${ctx}/baseNew/other/js/bootstrap-datetimepicker.js" type="text/javascript"></script>
		<script src="${ctx}/baseNew/other/js/locales/bootstrap-datetimepicker.zh-CN.js" type="text/javascript"></script>
		<link rel="stylesheet" href="${ctx}/baseNew/dist/css/AdminLTE.min.css">
  		<script src="${ctx}/baseNew/other/js/bootbox.min.js" type="text/javascript"></script>
  		<link rel="stylesheet" href="${ctx}/baseNew/validator/css/bootstrapValidator.css"/>
		<script type="text/javascript" src="${ctx}/baseNew/validator/js/bootstrapValidator.js"></script>
		<link rel="stylesheet" href="${ctx}/zenithsun/css/admin-imgList.css"/>
		<!-- 公用的按钮函数 -->
		<script>
			var addUrl = "${ctx}/path/role/initRole";//表单列表add 的url地址
			var delUrl = "${ctx}/path/role/delRole";//表单列表del的url地址
			var viewUrl = "${ctx}/path/role/viewRole";//表单列表view的url地址
			var editUrl = "${ctx}/path/role/editRole";//表单列表edit的url地址
			var listUrl = "${ctx}/path/role/listRole";//表单列表list 的url地址,用来作为搜索地址
			var saveAddUrl = "${ctx}/path/role/addRole";//表单列表save的url地址
			var saveEditUrl = "${ctx}/path/role/modRole";//表单列表save的url地址
 
			function defaultEvent(eventType,width,height) {
				FormFunction.defaultEvent(eventType,width,height);//默认的处理函数，需自定义时自己写 在PublicFunction.js里
			}
		</script>
	</head>

	<body class="rightBody">
		<form name="searchForm" method="post" action="" class="form-inline">
			<table width="100%" class="title" border="0" cellspacing="0" cellpadding="0">
				<tr>
				  <th>
				     <img src="${ctx}/zenithsun/images/back.png" width="26" height="26" alt="图标 " class="icon" />
					 <em class="headTips">系统管理</em> &gt; 角色管理
				  </th>
				  <th width="200"></th>
				</tr>
				<tr>
				  <td>
				    <div class="form-group">
					  <label class="control-label sr-only" for="searchValue_'title'_">Email address</label>
					  <input type="text" name="searchValue['title']" id="searchValue_'title'_" class="form-control input-sm" placeholder="search..."/>
					  <button type="button" class="btn btn-primary btn-sm" onclick="defaultEvent('search')">搜索</button>
				    </div>
				  </td>
				  <td align="right">
				    <div class="form-group">
				      <h:permission module="xxx_xxx" operation="add">
				        <button type="button" class="btn btn-primary btn-sm" onclick="FormFunction.showAddModal()">新增</button>
				      </h:permission>
				      <h:permission module="xxx_xxx" operation="del">
				        <button type="button" class="btn btn-primary btn-sm" onclick="defaultEvent('del')">删除</button>
				      </h:permission>
				    </div>
				  </td>
				</tr>
			</table>
			<h:table cssClass="table table-bordered table-hover table-striped" cssStyle="margin-bottom:-5px;">
				<h:column headerTitle="<input type='checkbox' name='slectAll' value='checkbox' onclick='selectAll(this.checked);'>" align="center" width="32">
					<input type="checkbox" name="selectedRow" value="${o.id }" />
				</h:column>
				
				<!-- generate code start -->

                <h:column headerTitle="角色编码">
                    ${o.code}
                </h:column>

                <h:column headerTitle="角色名称">
                    <a href="javascript:FormFunction.showViewModal('${o.id}');">${o.name}</a>
                </h:column>

				<!-- generate code end -->
				
				<h:column headerTitle="操作" width="80" align="center">
					<h:permission module="xxx_xxx" operation="edit">
						<a href="javascript:FormFunction.showEditModal('${o.id }');" class="linkorange">修改</a>
					</h:permission>
					<h:permission module="xxx_xxx" operation="del">
						<a href="javascript:FormFunction.delSingle('${o.id }');" class="linkorange">删除</a>
					</h:permission>
				</h:column>
			</h:table>
			<table width="100%" class="pageDown" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td align="right">
						<h:pager /> &nbsp;
					</td>
				</tr>
			</table>
		</form>
		<div id="myDlg"></div>
		<%@ include file="/base/jsp/common/CommonListFoot.jsp"%>
	</body>
</html>
